# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-dulwich
_pkgname=dulwich
pkgver=0.20.5
pkgrel=0
pkgdesc="A python implementation of the Git file formats and protocols"
url="https://www.dulwich.io"
arch="all"
license="GPL-2.0-or-later OR Apache-2.0"
options="!check" # Tests are failing (http-backend)
depends="py3-certifi py3-urllib3"
makedepends="py3-setuptools python3-dev"
checkdepends="py3-mock"
source="https://github.com/dulwich/dulwich/archive/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-dulwich-$pkgver

replaces="py-dulwich" # Backwards compatibility
provides="py-dulwich=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 -m unittest dulwich.tests.test_suite
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="0c408c57543b41eec4d92d630b595278d193257da85ad4258f23e3b1a32361afeb7183e7aaf89454700cc476697ebc5c44d6c26876fb5a43e9076ca2832cae4b  dulwich-0.20.5.tar.gz"
